#include<iostream>
#include<vector>
using namespace std;

class Solution {
public:
    vector<int> numberGame(vector<int>& nums)
    {
        ranges::sort(nums);
        vector<int> ans;
        for (int i = 0; i < nums.size(); i += 2)
        {
            if (i + 1 != nums.size())
                ans.push_back(nums[i + 1]);
            ans.push_back(nums[i]);
        }
        return ans;
    }
};